#!/usr/bin/make -f

# For some crappy reason Ubuntu includes this flag by default when building deb
# packages. This breaks signal/slot connections across *.sos in
# Corrade::Interconnect library and as said on the links below, it has some
# noticeable unintended/dangerous effects as well, so I'm just disabling it
# globally. See:
#  http://stackoverflow.com/questions/7216973/is-there-a-downside-to-using-bsymbolic-functions
#  https://software.intel.com/en-us/articles/performance-tools-for-software-developers-bsymbolic-can-cause-dangerous-side-effects
export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions

%:
	dh $@ --parallel

override_dh_auto_configure:
	dh_auto_configure -- \
		-DCMAKE_BUILD_TYPE=Release \
		-DMAGNUM_WITH_ASSIMPIMPORTER=ON \
		-DMAGNUM_WITH_ASTCIMPORTER=ON \
		-DMAGNUM_WITH_BASISIMAGECONVERTER=OFF \
		-DMAGNUM_WITH_BASISIMPORTER=OFF \
		-DMAGNUM_WITH_BCDECIMAGECONVERTER=ON \
		-DMAGNUM_WITH_CGLTFIMPORTER=ON \
		-DMAGNUM_WITH_DDSIMPORTER=ON \
		-DMAGNUM_WITH_DEVILIMAGEIMPORTER=ON \
		-DMAGNUM_WITH_DRFLACAUDIOIMPORTER=ON \
		-DMAGNUM_WITH_DRMP3AUDIOIMPORTER=ON \
		-DMAGNUM_WITH_DRWAVAUDIOIMPORTER=ON \
		-DMAGNUM_WITH_ETCDECIMAGECONVERTER=ON \
		-DMAGNUM_WITH_FAAD2AUDIOIMPORTER=ON \
		-DMAGNUM_WITH_FREETYPEFONT=ON \
		-DMAGNUM_WITH_GLSLANGSHADERCONVERTER=ON \
		-DMAGNUM_WITH_GLTFIMPORTER=ON \
		-DMAGNUM_WITH_GLTFSCENECONVERTER=ON \
		-DMAGNUM_WITH_ICOIMPORTER=ON \
		-DMAGNUM_WITH_JPEGIMAGECONVERTER=ON \
		-DMAGNUM_WITH_JPEGIMPORTER=ON \
		-DMAGNUM_WITH_KTXIMAGECONVERTER=ON \
		-DMAGNUM_WITH_KTXIMPORTER=ON \
		-DMAGNUM_WITH_MESHOPTIMIZERSCENECONVERTER=OFF \
		-DMAGNUM_WITH_MINIEXRIMAGECONVERTER=ON \
		-DMAGNUM_WITH_OPENEXRIMAGECONVERTER=ON \
		-DMAGNUM_WITH_OPENEXRIMPORTER=ON \
		-DMAGNUM_WITH_OPENGEXIMPORTER=ON \
		-DMAGNUM_WITH_PNGIMAGECONVERTER=ON \
		-DMAGNUM_WITH_PNGIMPORTER=ON \
		-DMAGNUM_WITH_PRIMITIVEIMPORTER=ON \
		-DMAGNUM_WITH_SPIRVTOOLSSHADERCONVERTER=ON \
		-DMAGNUM_WITH_SPNGIMPORTER=OFF \
		-DMAGNUM_WITH_STANFORDIMPORTER=ON \
		-DMAGNUM_WITH_STANFORDSCENECONVERTER=ON \
		-DMAGNUM_WITH_STBDXTIMAGECONVERTER=ON \
		-DMAGNUM_WITH_STBIMAGECONVERTER=ON \
		-DMAGNUM_WITH_STBIMAGEIMPORTER=ON \
		-DMAGNUM_WITH_STBRESIZEIMAGECONVERTER=ON \
		-DMAGNUM_WITH_STBTRUETYPEFONT=ON \
		-DMAGNUM_WITH_STBVORBISAUDIOIMPORTER=ON \
		-DMAGNUM_WITH_STLIMPORTER=ON \
		-DMAGNUM_WITH_TINYGLTFIMPORTER=ON \
		-DMAGNUM_WITH_UFBXIMPORTER=ON \
		-DMAGNUM_WITH_WEBPIMAGECONVERTER=ON \
		-DMAGNUM_WITH_WEBPIMPORTER=ON
